API Docs for: 0.0.8
Show:

FxaRelierClient (start here) Class

The entry point. Create and use an instance of the FxaRelierClient.

Constructor

FxaRelierClient (start here)

(
  • clientId
  • [options={}]
)

Parameters:

  • clientId String
    • the OAuth client ID for the relier
  • [options={}] Object optional
    • configuration
    • [clientSecret] String optional

      Client secret. Required to use the Token API.

    • [contentHost] String optional

      Firefox Accounts Content Server host

    • [oauthHost] String optional

      Firefox Accounts OAuth Server host

    • [profileHost] String optional

      Firefox Accounts Profile Server host

    • [window] Object optional

      window override, used for unit tests

    • [lightbox] Object optional

      lightbox override, used for unit tests

    • [channel] Object optional

      channel override, used for unit tests

Example:

var fxaRelierClient = new FxaRelierClient(<client_id>);
                                

Item Index

Properties

Properties

auth

Object

Authenticate users in the browser. Implements AuthAPI.

Example:

var fxaRelierClient = new FxaRelierClient('<client_id>');
                                            fxaRelierClient.auth.signIn({
                                              state: <state>,
                                              redirectUri: <redirect_uri>,
                                              scope: 'profile'
                                            });
                                            

profile

Object

Fetch profile information on the server. Implements ProfileAPI.

Example:

var fxaRelierClient = new FxaRelierClient('<client_id>', {
                                              clientSecret: <client_secret>
                                            });
                                            fxaRelierClient.token.tradeCode(<code>)
                                              .then(function (token) {
                                                return fxaRelierClient.fetch(token);
                                              })
                                              .then(function (profile) {
                                                // display some profile info.
                                              });
                                            

token

Object

Manage tokens on the server. Implements TokenAPI.

Example:

var fxaRelierClient = new FxaRelierClient('<client_id>', {
                                              clientSecret: <client_secret>
                                            });
                                            fxaRelierClient.token.tradeCode(<code>)
                                              .then(function (token) {
                                                // do something awesome with the token like get
                                                // profile information. See profile.
                                              });
                                            

version

String

FxaRelierClient version